<?php
/* @var $this ThongtinsvController */
/* @var $model Thongtinsv */
/* @var $form CActiveForm */
?>

<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
)); ?>

	<table>
	<div class="row">
	<tr>
		<td style='width:20%'><?php echo $form->labelEx($model,'makhoilop'); ?></td>
		<td><?php echo $form->textField($model,'makhoilop',array('size'=>6,'maxlength'=>6)); ?></td>
	</tr>
	</div>

	<div class="row">
	<tr>
		<td><?php echo $form->labelEx($model,'thuockhoa'); ?></td>
		<td><?php
			$connection=Yii::app()->db;
				$commandDV=$connection->createCommand()
					->select('madonvi,tendonvi')
					->from('donvicongtac')
					->query();
					$khoa= array();
					$khoa['rong']='';
					foreach($commandDV as $rowDV)
					{
						//array_push($ngach,$row);
						if(substr( $rowDV['madonvi'],0,1)=='K')
						{
						$khoa[$rowDV['madonvi']]=$rowDV['tendonvi'];}
					}
		echo $form->dropDownList($model,'thuockhoa',$khoa,array('options'=>array('rong'=>array('selected'=>'selected')))); ?></td>
	</tr>
	</div>

	<div class="row">
	<tr>
		<td><?php echo $form->labelEx($model,'soluongsv'); ?></td>
		<td><?php echo $form->textField($model,'soluongsv'); ?></td>
	</tr>
	</div>

	<div class="row">
	<tr>
		<td><?php echo $form->labelEx($model,'trinhdo'); ?></td>
		<td><?php echo $form->dropDownList($model,'trinhdo',array('rong'=>'','ĐH'=>'Đại học','CĐ'=>'Cao đẳng'),array('options'=>array('rong'=>array('selected'=>'selected')))); ?></td>
	</tr>
	</div>

	<div class="row">
	<tr>
		<td><?php echo $form->labelEx($model,'namvaotruong'); ?></td>
		<td><?php
			$now=getdate();
			$year=array();
			$year['rong']='';
			for($i=$now['year']-7;$i<=$now['year'];$i++)
				$year[$i]=$i;
		echo $form->dropDownList($model,'namvaotruong',$year,array('options'=>array('rong'=>array('selected'=>'selected')))); ?></td>
	</tr>
	</div>

	<div class="row buttons">
	<tr>
		<td></td>
		<td><?php echo CHtml::submitButton('Tìm kiếm'); ?></td>
	</tr>
	</div>
</table>
<?php $this->endWidget(); ?>

</div><!-- search-form -->